package com.sxt.practiceapplication.entity.baseentity;

import org.jetbrains.annotations.NotNull;

public class BaseData<T> {

    private String code;

    private String message;

    private T data;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public static class Data<T> {

        private int count;

        private T results;

        public int getCount() {
            return count;
        }

        public void setCount(int count) {
            this.count = count;
        }

        public T getResults() {
            return results;
        }

        public void setResults(T results) {
            this.results = results;
        }

        @NotNull
        @Override
        public String toString() {
            return "Data{" +
                    "count=" + count +
                    ", result=" + results +
                    '}';
        }
    }
}
